package org.boot.easyapi.enums.permission;

import lombok.Getter;

@Getter
public enum StatusEnum {

    ENABLE(0, "启用"),
    DISABLE(1, "禁用");

    private Integer code;
    private String note;

    StatusEnum(Integer code, String note) {
        this.code = code;
        this.note = note;
    }

    public static StatusEnum getByCode(Integer code) {
        for (StatusEnum value : StatusEnum.values()) {
            if (value.code.equals(code)) {
                return value;
            }
        }
        return null;
    }


}
